home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / var / db / pkg / dev-python / pycrypto-2.0.1-r5 / pycrypto-2.0.1-r5.ebuild < prev    next >
Text File  |  2006-06-22  |  1KB  |  54 lines

  1. # Copyright 1999-2006 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/pycrypto-2.0.1-r5.ebuild,v 1.12 2006/05/21 23:53:13 kugelfang Exp $
  4.  
  5. inherit eutils distutils toolchain-funcs flag-o-matic
  6.  
  7. DESCRIPTION="Python Cryptography Toolkit"
  8. HOMEPAGE="http://www.amk.ca/python/code/crypto.html"
  9. SRC_URI="http://www.amk.ca/files/python/crypto/${P}.tar.gz"
  10.  
  11. LICENSE="freedist"
  12. SLOT="0"
  13. KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ~ppc-macos ppc64 s390 ~sh sparc x86 ~x86-fbsd"
  14. IUSE="bindist gmp test"
  15.  
  16. RDEPEND="virtual/python
  17.     gmp? ( dev-libs/gmp )"
  18. DEPEND="${RDEPEND}
  19.     test? ( =dev-python/sancho-0.11-r1 )"
  20.  
  21. src_unpack() {
  22.     unpack ${A}
  23.     cd "${S}"
  24.     use bindist && epatch "${FILESDIR}"/${P}-bindist.patch
  25.     epatch "${FILESDIR}"/${P}-sha256.patch
  26.     epatch "${FILESDIR}"/${P}-gmp.patch
  27.     epatch "${FILESDIR}"/pycrypto-2.0.1-uint32.patch
  28.     epatch "${FILESDIR}"/${P}-sancho-package-rename.patch
  29. }
  30.  
  31. src_compile() {
  32.     use gmp \
  33.         && export USE_GMP=1 \
  34.         || export USE_GMP=0
  35.     # sha256 hashes occasionally trigger ssp when built with
  36.     # -finline-functions (implied by -O3).
  37.     gcc-specs-ssp && append-flags -fno-inline-functions
  38.     distutils_src_compile
  39. }
  40.  
  41. src_test() {
  42.     export PYTHONPATH=$(ls -d "${S}"/build/lib.*/)
  43.     python ./test.py || die "test failed"
  44.     if use test ; then
  45.         local x
  46.         cd test
  47.         for x in test_*.py ; do
  48.             python ${x} || die "${x} failed"
  49.         done
  50.     fi
  51. }
  52.  
  53. DOCS="ACKS ChangeLog PKG-INFO README TODO Doc/pycrypt.tex"
  54.